DateTimeEditors for WinRT
Setting the Value Increment

By default, the time on a C1TimeEditor control is set to move in one minute increments. You can change this by setting the C1TimeEditor.Increment property to whatever time increment you specify. In this topic, you will set the time increment on the C1TimeEditor control to one hour and thirty minutes. For more information about time increments, visit the Value Increment topic.

In the Designer

Complete the following steps:

  1. Click the C1TimeEditor control once to select it.
  2. In the Properties window, locate the C1TimeEditor.Increment property and enter "01:30:00" into its text box.
  3. Run the project and click the increase time button. Observe that time jumps ahead by one hour and thirty minutes.

In XAML

Complete the following steps:

  1. Add Increment="01:30:00" to the <DateTimeEditors:C1TimeEditor>tag so that the markup resembles the following:
Markup
Copy Code
<DateTimeEditors:C1TimeEditor Increment="01:30:00"/>
  1. Run the project and click the increase time button. Observe that time jumps ahead by one hour and thirty minutes.

In Code

Complete the following steps:         

  1. Open the MainPage.xaml.cs page.
  2. Place the following code beneath the InitializeComponent() method:
Visual Basic
Copy Code
C1TimeEditor1.Increment= New TimeSpan(01,30, 00)

C#
Copy Code
c1TimeEditor1.Increment= new TimeSpan(01,30,00);
  1. Run the project and click the increase time button . Observe that time jumps ahead by one hour and thirty minutes.
See Also

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback